/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.io.FileInputStream;

/**
 * <p>Project: jse2204 - Str4
 * <p>Powered by webrx On 2022-09-13 17:36:30
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Str4 {
    public static void main(String[] args) {
        //实现统计当前文件的多少行代码 ctrl+shift+c 复制当前文件的路径
        String src = "D:\\0824\\javase\\jse2204\\jse2204\\ch06\\src\\cn\\webrx\\Str4.java";

        //try with
        try (var fis = new FileInputStream(src)) {
            System.out.println(new String(fis.readAllBytes()).lines().count());
        } catch (Exception e) {

        }
    }
}
